<?php
class SeoHelper extends AppHelper {

	/**
	 * Fix SQL Injection
	 */

	public $helpers=array('Common');

	public function link($url=null){
		$seoUrl=$url;
		$friendlyUrls=Cache::read('friendlyUrl');
		if(!empty($friendlyUrls)){
			$seoUrl=array_search($url, $friendlyUrls);
			if(empty($seoUrl))$seoUrl=$url;
		}
		return SITE_URL.$seoUrl;
	}
}
?>
